package com.betterjr.modules.profit.entity;

import com.betterjr.common.annotation.*;
import com.betterjr.common.entity.BetterjrEntity;
import java.math.BigDecimal;
import javax.persistence.*;

@Access(AccessType.FIELD)
@Entity
@Table(name = "t_scf_loan_service")
public class ScfLoanService implements BetterjrEntity {
    /**
     * 主键ID
     */
    @Id
    @Column(name = "ID",  columnDefinition="INTEGER" )
    @MetaData( value="主键ID", comments = "主键ID")
    private Long id;

    /**
     * 贷款项目id
     */
    @Column(name = "L_LOAN_ID",  columnDefinition="INTEGER" )
    @MetaData( value="贷款项目id", comments = "贷款项目id")
    private Long loanId;

    /**
     * 供应商名称
     */
    @Column(name = "C_CUSTNAME",  columnDefinition="VARCHAR" )
    @MetaData( value="供应商名称", comments = "供应商名称")
    private String custname;

    /**
     * 供应商代码
     */
    @Column(name = "C_CUSTCODE",  columnDefinition="VARCHAR" )
    @MetaData( value="供应商代码", comments = "供应商代码")
    private String custcode;

    /**
     * 供应商编号
     */
    @Column(name = "L_CUSTNO",  columnDefinition="INTEGER" )
    @MetaData( value="供应商编号", comments = "供应商编号")
    private Long custno;

    /**
     * 核心企业名称
     */
    @Column(name = "C_CORENAME",  columnDefinition="VARCHAR" )
    @MetaData( value="核心企业名称", comments = "核心企业名称")
    private String corename;

    /**
     * 核心企业编号
     */
    @Column(name = "L_CORENO",  columnDefinition="INTEGER" )
    @MetaData( value="核心企业编号", comments = "核心企业编号")
    private Long coreno;

    /**
     * 核心企业组织机构代码
     */
    @Column(name = "C_COREOPERORG",  columnDefinition="VARCHAR" )
    @MetaData( value="核心企业组织机构代码", comments = "核心企业组织机构代码")
    private String coreoperorg;

    /**
     * 资金方名称
     */
    @Column(name = "C_FACTORYNAME",  columnDefinition="VARCHAR" )
    @MetaData( value="资金方名称", comments = "资金方名称")
    private String factoryname;

    /**
     * 资金方编号
     */
    @Column(name = "L_FACTORYNO",  columnDefinition="INTEGER" )
    @MetaData( value="资金方编号", comments = "资金方编号")
    private Long factoryno;

    /**
     * 资金方放款日期
     */
    @Column(name = "C_LOAN_DATE",  columnDefinition="CHAR" )
    @MetaData( value="资金方放款日期", comments = "资金方放款日期")
    private String loanDate;

    /**
     * 融资期限
     */
    @Column(name = "N_FINANCINGMATURITY_DATE",  columnDefinition="INTEGER" )
    @MetaData( value="融资期限", comments = "融资期限")
    private Long financingmaturityDate;

    /**
     * 贷款金额
     */
    @Column(name = "F_LOAN_BALANCE",  columnDefinition="DECIMAL" )
    @MetaData( value="贷款金额", comments = "贷款金额")
    private BigDecimal loanBalance;

    /**
     * 服务费率
     */
    @Column(name = "F_SERVICE_RATE",  columnDefinition="DECIMAL" )
    @MetaData( value="服务费率", comments = "服务费率")
    private BigDecimal serviceRate;

    /**
     * 服务费金额
     */
    @Column(name = "F_SERVICE_CHARGE",  columnDefinition="DECIMAL" )
    @MetaData( value="服务费金额", comments = "服务费金额")
    private BigDecimal serviceCharge;

    /**
     * 结算周期
     */
    @Column(name = "C_SETTLEACCOUNTS_TYPE",  columnDefinition="CHAR" )
    @MetaData( value="结算周期", comments = "结算周期")
    private String settleaccountsType;

    /**
     * 收取服务费时间
     */
    @Column(name = "C_GATHERING_DATE",  columnDefinition="CHAR" )
    @MetaData( value="收取服务费时间", comments = "收取服务费时间")
    private String gatheringDate;

    /**
     * 收取服务费方式
     */
    @Column(name = "C_GATHERING_TYPE",  columnDefinition="CHAR" )
    @MetaData( value="收取服务费方式", comments = "收取服务费方式")
    private String gatheringType;

    /**
     * 服务费状态1：待收取服务费   2 已收取  3 作废
     */
    @Column(name = "C_BUSINSTATUS",  columnDefinition="CHAR" )
    @MetaData( value="服务费状态1：待收取服务费   2 已收取  3 作废", comments = "服务费状态1：待收取服务费   2 已收取  3 作废")
    private String businstatus;

    /**
     * 分润比例
     */
    @Column(name = "F_SHARE_SCALE",  columnDefinition="DECIMAL" )
    @MetaData( value="分润比例", comments = "分润比例")
    private BigDecimal shareScale;

    /**
     * 描述说明
     */
    @Column(name = "C_DESCRIPTION",  columnDefinition="VARCHAR" )
    @MetaData( value="描述说明", comments = "描述说明")
    private String description;

    private static final long serialVersionUID = 1530513942601L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getLoanId() {
        return loanId;
    }

    public void setLoanId(Long loanId) {
        this.loanId = loanId;
    }

    public String getCustname() {
        return custname;
    }

    public void setCustname(String custname) {
        this.custname = custname;
    }

    public String getCustcode() {
        return custcode;
    }

    public void setCustcode(String custcode) {
        this.custcode = custcode;
    }

    public Long getCustno() {
        return custno;
    }

    public void setCustno(Long custno) {
        this.custno = custno;
    }

    public String getCorename() {
        return corename;
    }

    public void setCorename(String corename) {
        this.corename = corename;
    }

    public Long getCoreno() {
        return coreno;
    }

    public void setCoreno(Long coreno) {
        this.coreno = coreno;
    }

    public String getCoreoperorg() {
        return coreoperorg;
    }

    public void setCoreoperorg(String coreoperorg) {
        this.coreoperorg = coreoperorg == null ? null : coreoperorg.trim();
    }

    public String getFactoryname() {
        return factoryname;
    }

    public void setFactoryname(String factoryname) {
        this.factoryname = factoryname;
    }

    public Long getFactoryno() {
        return factoryno;
    }

    public void setFactoryno(Long factoryno) {
        this.factoryno = factoryno;
    }

    public String getLoanDate() {
        return loanDate;
    }

    public void setLoanDate(String loanDate) {
        this.loanDate = loanDate;
    }

    public Long getFinancingmaturityDate() {
        return financingmaturityDate;
    }

    public void setFinancingmaturityDate(Long financingmaturityDate) {
        this.financingmaturityDate = financingmaturityDate;
    }

    public BigDecimal getLoanBalance() {
        return loanBalance;
    }

    public void setLoanBalance(BigDecimal loanBalance) {
        this.loanBalance = loanBalance;
    }

    public BigDecimal getServiceRate() {
        return serviceRate;
    }

    public void setServiceRate(BigDecimal serviceRate) {
        this.serviceRate = serviceRate;
    }

    public BigDecimal getServiceCharge() {
        return serviceCharge;
    }

    public void setServiceCharge(BigDecimal serviceCharge) {
        this.serviceCharge = serviceCharge;
    }

    public String getSettleaccountsType() {
        return settleaccountsType;
    }

    public void setSettleaccountsType(String settleaccountsType) {
        this.settleaccountsType = settleaccountsType == null ? null : settleaccountsType.trim();
    }

    public String getGatheringDate() {
        return gatheringDate;
    }

    public void setGatheringDate(String gatheringDate) {
        this.gatheringDate = gatheringDate;
    }

    public String getGatheringType() {
        return gatheringType;
    }

    public void setGatheringType(String gatheringType) {
        this.gatheringType = gatheringType;
    }

    public String getBusinstatus() {
        return businstatus;
    }

    public void setBusinstatus(String businstatus) {
        this.businstatus = businstatus;
    }

    public BigDecimal getShareScale() {
        return shareScale;
    }

    public void setShareScale(BigDecimal shareScale) {
        this.shareScale = shareScale;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", loanId=").append(loanId);
        sb.append(", custname=").append(custname);
        sb.append(", custcode=").append(custcode);
        sb.append(", custno=").append(custno);
        sb.append(", corename=").append(corename);
        sb.append(", coreno=").append(coreno);
        sb.append(", coreoperorg=").append(coreoperorg);
        sb.append(", factoryname=").append(factoryname);
        sb.append(", factoryno=").append(factoryno);
        sb.append(", loanDate=").append(loanDate);
        sb.append(", financingmaturityDate=").append(financingmaturityDate);
        sb.append(", loanBalance=").append(loanBalance);
        sb.append(", serviceRate=").append(serviceRate);
        sb.append(", serviceCharge=").append(serviceCharge);
        sb.append(", settleaccountsType=").append(settleaccountsType);
        sb.append(", gatheringDate=").append(gatheringDate);
        sb.append(", gatheringType=").append(gatheringType);
        sb.append(", businstatus=").append(businstatus);
        sb.append(", shareScale=").append(shareScale);
        sb.append(", description=").append(description);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ScfLoanService other = (ScfLoanService) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getLoanId() == null ? other.getLoanId() == null : this.getLoanId().equals(other.getLoanId()))
                && (this.getCustname() == null ? other.getCustname() == null : this.getCustname().equals(other.getCustname()))
                && (this.getCustcode() == null ? other.getCustcode() == null : this.getCustcode().equals(other.getCustcode()))
                && (this.getCustno() == null ? other.getCustno() == null : this.getCustno().equals(other.getCustno()))
                && (this.getCorename() == null ? other.getCorename() == null : this.getCorename().equals(other.getCorename()))
                && (this.getCoreno() == null ? other.getCoreno() == null : this.getCoreno().equals(other.getCoreno()))
                && (this.getCoreoperorg() == null ? other.getCoreoperorg() == null : this.getCoreoperorg().equals(other.getCoreoperorg()))
                && (this.getFactoryname() == null ? other.getFactoryname() == null : this.getFactoryname().equals(other.getFactoryname()))
                && (this.getFactoryno() == null ? other.getFactoryno() == null : this.getFactoryno().equals(other.getFactoryno()))
                && (this.getLoanDate() == null ? other.getLoanDate() == null : this.getLoanDate().equals(other.getLoanDate()))
                && (this.getFinancingmaturityDate() == null ? other.getFinancingmaturityDate() == null : this.getFinancingmaturityDate().equals(other.getFinancingmaturityDate()))
                && (this.getLoanBalance() == null ? other.getLoanBalance() == null : this.getLoanBalance().equals(other.getLoanBalance()))
                && (this.getServiceRate() == null ? other.getServiceRate() == null : this.getServiceRate().equals(other.getServiceRate()))
                && (this.getServiceCharge() == null ? other.getServiceCharge() == null : this.getServiceCharge().equals(other.getServiceCharge()))
                && (this.getSettleaccountsType() == null ? other.getSettleaccountsType() == null : this.getSettleaccountsType().equals(other.getSettleaccountsType()))
                && (this.getGatheringDate() == null ? other.getGatheringDate() == null : this.getGatheringDate().equals(other.getGatheringDate()))
                && (this.getGatheringType() == null ? other.getGatheringType() == null : this.getGatheringType().equals(other.getGatheringType()))
                && (this.getBusinstatus() == null ? other.getBusinstatus() == null : this.getBusinstatus().equals(other.getBusinstatus()))
                && (this.getShareScale() == null ? other.getShareScale() == null : this.getShareScale().equals(other.getShareScale()))
                && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getLoanId() == null) ? 0 : getLoanId().hashCode());
        result = prime * result + ((getCustname() == null) ? 0 : getCustname().hashCode());
        result = prime * result + ((getCustcode() == null) ? 0 : getCustcode().hashCode());
        result = prime * result + ((getCustno() == null) ? 0 : getCustno().hashCode());
        result = prime * result + ((getCorename() == null) ? 0 : getCorename().hashCode());
        result = prime * result + ((getCoreno() == null) ? 0 : getCoreno().hashCode());
        result = prime * result + ((getCoreoperorg() == null) ? 0 : getCoreoperorg().hashCode());
        result = prime * result + ((getFactoryname() == null) ? 0 : getFactoryname().hashCode());
        result = prime * result + ((getFactoryno() == null) ? 0 : getFactoryno().hashCode());
        result = prime * result + ((getLoanDate() == null) ? 0 : getLoanDate().hashCode());
        result = prime * result + ((getFinancingmaturityDate() == null) ? 0 : getFinancingmaturityDate().hashCode());
        result = prime * result + ((getLoanBalance() == null) ? 0 : getLoanBalance().hashCode());
        result = prime * result + ((getServiceRate() == null) ? 0 : getServiceRate().hashCode());
        result = prime * result + ((getServiceCharge() == null) ? 0 : getServiceCharge().hashCode());
        result = prime * result + ((getSettleaccountsType() == null) ? 0 : getSettleaccountsType().hashCode());
        result = prime * result + ((getGatheringDate() == null) ? 0 : getGatheringDate().hashCode());
        result = prime * result + ((getGatheringType() == null) ? 0 : getGatheringType().hashCode());
        result = prime * result + ((getBusinstatus() == null) ? 0 : getBusinstatus().hashCode());
        result = prime * result + ((getShareScale() == null) ? 0 : getShareScale().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        return result;
    }
}